package com.zilue.payment.gateway.mapper;

import com.zilue.payment.gateway.domain.PayOrderDO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Created by zilue on 2017/3/8.
 */
//@Mapper
public interface PayOrderMapper {
    List<PayOrderDO> queryByOrderNo(@Param("orderNo") String orderNo, @Param("corpId") Long corpId, @Param("subCorpId") Long subCorpId);

    Long insert(PayOrderDO payOrder);

    List<PayOrderDO> queryByOrderNoOutTradeNo(@Param("orderNo") String orderNo, @Param("outTradeNo") String outTradeNo, @Param("outPayNo") String outPayNo, @Param("corpId") Long corpId, @Param("subCorpId") Long subCorpId);

    int updateStatus(@Param("id") Long id, @Param("oldStatus") Integer oldStatus, @Param("status") Integer status);

    int updateRefundFee(@Param("id") Long id, @Param("oldRefundFee") Long oldRefundFee, @Param("refundFee") Long refundFee);

    int updatePayDate(@Param("id") Long id, @Param("payDate") Date payDate);

    int updateOutPayNo(@Param("id") Long id, @Param("outPayNo") String outPayNo);
}
